#!/usr/bin/env php
<?php

declare(strict_types=1);

/**
 * Copyright (c) 2021-2025 guanguans<ityaozm@gmail.com>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 *
 * @see https://github.com/guanguans/laravel-skeleton
 */

\defined('LARAVEL_START') or \define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/

require_once __DIR__.'/vendor/autoload_runtime.php';

return static function (): Illuminate\Contracts\Console\Kernel {
    static $app;

    if (null === $app) {
        $app = require __DIR__.'/bootstrap/app.php';
    }

    return $app->make(Illuminate\Contracts\Console\Kernel::class);
};
